﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BBPA.Admin.SYS.Orders.Receive
{
    public partial class List : ListPage
    {
        BLL.V_Orders bllList = new BLL.V_Orders();
        BLL.Orders bll = new BLL.Orders();
        //
        BLL.Orders_Goods bllOrders_Goods = new BLL.Orders_Goods();
        BLL.Goods bllGoods = new BLL.Goods();
        BLL.Orders_State_Log bllOrders_State_Log = new BLL.Orders_State_Log();
        BLL.Supplier bllSupplier = new BLL.Supplier();
        BLL.Account_Change_Log bllAccount_Change_Log = new BLL.Account_Change_Log();
        protected void Page_Load(object sender, EventArgs e)
        {
            string sql_IsDelivery = "select OrdersID from V_Orders_Goods where IsDelivery=1 and hasPay_Delivery=0";
            //
            Master.show_btn_add = Master.show_btn_bat_del = Master.show_info = Master.show_edit = false;
            Master.show_formControls = true;
           // Master.BasicSQL = "State=" + (int)EnumHelper.OrdersState.Buying + " and FirstExpectBuyDate is not null and datediff(day,FirstExpectBuyDate,getdate())>=0 and id  in(" + sql_IsDelivery + ")";
            Master.BasicSQL = "State=" + (int)EnumHelper.OrdersState.Buying + " and id  in(" + sql_IsDelivery + ")";
            //Master.BasicSQL = "(State=" + (int)EnumHelper.OrdersState.GetMoney + " or State=" + (int)EnumHelper.OrdersState.Buying + " ) and FirstExpectBuyDate is not null and datediff(day,FirstExpectBuyDate,getdate())>=0";
       
        }
        public override void buildSQL_Page_List_search() { }
        public override DataSet get_Page_DataSet(string sql_, string orderby_, int pageFrom_, int pageTo_) { return bllList.GetListByPage(sql_, orderby_, pageFrom_, pageTo_); }


    }
}